projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
400e3ac
)
luci-base: dispatcher: fix rpc controller regression
author
Jo-Philipp Wich
<
[email protected]
>
Tue, 7 Jan 2020 08:08:49 +0000
(09:08 +0100)
committer
Jo-Philipp Wich
<
[email protected]
>
Thu, 7 May 2020 17:40:49 +0000
(19:40 +0200)
When testing the luci-rpc authnetication, avoid clobbering the HTTP
post request body.
Fixes: #3470
Signed-off-by: Jo-Philipp Wich <
[email protected]
>
(cherry picked from commit
38c9c9e0a2564b9644a56f1143f6acf0c9e272c8
)
modules/luci-base/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/dispatcher.lua
b/modules/luci-base/luasrc/dispatcher.lua
index 13b2819c2eeb743b6c1712117da444b3aab7cce4..6b10d49e5b156e9cc92d64bacc78b87b2660e365 100644
(file)
--- a/
modules/luci-base/luasrc/dispatcher.lua
+++ b/
modules/luci-base/luasrc/dispatcher.lua
@@
-305,7
+305,7
@@
local function tree_to_json(node, json)
elseif subname == "rpc" and subnode.module == "luci.controller.rpc" then
spec.auth = {
login = false,
- methods = { "
param
:auth", "cookie:sysauth" }
+ methods = { "
query
:auth", "cookie:sysauth" }
}
elseif subnode.module == "luci.controller.admin.uci" then
spec.auth = {
@@
-546,6
+546,8
@@
local function check_authentication(method)
sid = http.getcookie(auth_param)
elseif auth_type == "param" then
sid = http.formvalue(auth_param)
+ elseif auth_type == "query" then
+ sid = http.formvalue(auth_param, true)
end
return session_retrieve(sid)